
public class Item implements Comparable<Item>{
	private String name;
	private String desc;
	private String command;
	private int cost;
	private int sell;
	private int qty;
	public Item(Item i, int qty){
		this.qty = qty;
		this.name = i.name;
		this.desc = i.desc;
		this.command = i.command;
		this.cost = i.cost;
		this.sell = i.sell;
		i.setQty(i.getQty() - qty);
	}
	public Item(String name, String desc, String command, int cost, int Quantity){
		this.name = name;
		this.desc = desc;
		this.command = command;
		this.cost = cost;
		this.sell = cost / 2;
		this.setQty(Quantity);
	}
	public int compareTo(Item o) {
		return getName().compareTo(o.getName());
	}
	public String getName() {
		return name;
	}
	public String getDesc() {
		return desc;
	}
	public String getCommand() {
		return command;
	}
	public int getCost(){
		return cost;
	}
	public int getSellPrice(){
		return sell;
	}
	public int getQty() {
		return qty;
	}
	public void setQty(int qty) {
		this.qty = qty;
	}
}
